/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const systemManagementRouter = {
  path: '/systemManagement',
  component: Layout,
  redirect: '/systemManagement/operationLog',
  name: 'SystemManagement',
  meta: {
    title: '系统管理',
    icon: 'nested',
    roles: ['system']
  },
  children: [{
    path: 'operationLog',
    name: 'OperationLog',
    component: () => import('@/views/systemManagement/index'),
    meta: {
      title: '操作日志',
      // icon: 'form',
      roles: ['operateLog:get']
    }
  },
  {
    path: 'notice',
    name: 'Notice',
    component: () => import('@/views/notice/index'),
    meta: {
      title: '系统公告',
      // icon: 'notice',
      // activeMenu: 'systemManagement',
      roles: ['notice:get']
    }
  },
  {
    path: 'createNotice',
    name: 'CreateNotice',
    hidden: true,
    component: () => import('@/views/notice/createNotice'),
    meta: {
      title: '创建公告',
      activeMenu: 'systemManagement',
      parentRouter: {
        path: 'notice',
        meta: {
          title: '系统公告'
        }
      }
    }
  },
  {
    path: 'edgeNotice',
    name: 'EdgeNotice',
    hidden: true,
    component: () => import('@/views/notice/edgeNotice'),
    meta: {
      title: '编辑公告',
      activeMenu: 'systemManagement',
      parentRouter: {
        path: 'notice',
        meta: {
          title: '系统公告'
        }
      }
    }
  },
  {
    path: 'detailNotice',
    name: 'DetailNotice',
    hidden: true,
    component: () => import('@/views/notice/detailNotice'),
    meta: {
      title: '公告详情',
      activeMenu: 'systemManagement',
      parentRouter: {
        path: 'notice',
        meta: {
          title: '系统公告'
        }
      }
    }
  },
  {
    path: 'contactUnit',
    name: 'contactUnit',
    component: () => import('@/views/contactUnit/index'),
    meta: {
      title: '联系我们',
      // icon: 'phone',
      roles: ['contact:get']
    }
  },
  {
    path: 'version',
    name: 'Version',
    component: () => import('@/views/version/index'),
    meta: {
      title: '版本控制',
      // icon: 'version',
      roles: ['version:get']
    }
  }
  ]
}

export default systemManagementRouter
